<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>对两个字符串相加，第一个字符串中包含空格</title>
</head>

<body>

    <h1>JavaScript 运算符</h1>
    <p>+ 运算符级联（相加）字符串。</p>
    <p id="demo"></p>
    <script>
        var txt1 = "What a very ";
        var txt2 = "nice day";
        document.getElementById("demo").innerHTML = txt1 + txt2;
    </script>
</body>

</html>